package com.wd.demo1.utils;

import com.intellij.notification.Notification;
import com.intellij.notification.NotificationGroup;
import com.intellij.notification.NotificationGroupManager;
import com.intellij.notification.NotificationType;
import com.intellij.openapi.project.Project;

/**
 * @author lww
 * @date 2025-10-28 16:08
 */
public class NotificationUtils {

	private static final NotificationGroup NOTIFICATION_GROUP =
			NotificationGroupManager.getInstance().getNotificationGroup("wd.demo1.NotificationGroup");

	public static void showInfoNotification(Project project, String title, String message) {
		if (project != null) {
			Notification notification = NOTIFICATION_GROUP.createNotification(
					title,
					message,
					NotificationType.INFORMATION
			);
			notification.notify(project);
		}
	}
}
